<?php if($session->check('Auth.User.id')){?>
<?php if(isset($my_friends) && !empty($my_friends)){
	foreach ($my_friends as $key => $friend) {
?>
	<div class="events">
		<div class="events-info  corners-4">
			<span class="autor" style="width: 100%">
				<?php echo $this->Html->link($this->Html->image(HOST.'/icon_user.png',array('title'=>$friend['User']['first_name'].__(' Profile',true))),array('controller'=>'users','action'=>'view',$friend['User']['id']),array('escape'=>false))?>
				<?php if($friend['User']['skipper']) echo $this->Html->link($this->Html->image(HOST.'/icon_skipper.png',array('title'=>__(' Have Skipper License',true))),array('controller'=>'users','action'=>'view',$friend['User']['id']),array('escape'=>false))?>
				<?php echo $this->Html->link($this->Html->image(HOST.'/icon_friend_delete.png',array('title'=>__('Delete Friend',true))),array('controller'=>'friends','action'=>'delete',$friend['User']['id']),array('escape'=>false))?>
				<?php echo $this->Html->link($this->Html->image(HOST.'/icon_message_add.png',array('title'=>__('Create Message',true))),array('controller'=>'messages','action'=>'add',$friend['User']['id']),array('escape'=>false))?>
				<?php echo $friend['User']['first_name']?>
			</span>
			<div class="clr"></div>
		</div>
		<div class="clr"></div>
	</div>
	
<?php }}}else{
	echo sprintf(__('Please %s to add friends.',true),$this->Html->link(__('login',true),array('plugin'=>false,'controller'=>'users','action'=>'welcome')));	
}?>
